# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: knuxify <knuxify@gmail.com>
pkgname=pinta
pkgver=2.1.1
pkgrel=2
pkgdesc="Simple GTK# paint program"
url="https://www.pinta-project.com/"
arch="x86_64 aarch64 armv7" # other arches blocked by dotnet7
license="MIT"
depends="dotnet7-runtime gtk+3.0"
makedepends="dotnet7-sdk gettext-dev gtk+3.0-dev intltool"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"
source="https://github.com/PintaProject/Pinta/releases/download/$pkgver/pinta-$pkgver.tar.gz"

prepare() {
	default_prepare
	# Packaging fails without this
	sed -i '/^PINTA_BUILD_OPTS/ s/$/ -maxcpucount:1/' Makefile.in
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
1ec3437aa75c9b4de71a118222b93a37af8fe3b660b9e705004866af15f864b9f3f623a4c8840b6dfe481c615d47d1a8131c7c881d50fd06ca7c4ff1440f3fd6  pinta-2.1.1.tar.gz
"
